using UnityEngine;

public class TNTScript : MonoBehaviour
{
	public EffectTNT effect;

	public float breakForce;

	private void Start()
	{
		effect.transform.SetParent(null);
	}

	private void Update()
	{
		Input.GetKeyDown(KeyCode.N);
	}

	private void playEffect()
	{
		bool flag = (bool)SlowMotionManager.Instance;
		SlowMotionManager.Instance._SlowOnHit();
		effect.transform.position = base.transform.position;
		effect.Play();
		base.gameObject.SetActive(value: false);
	}

	private void OnCollisionEnter2D(Collision2D coll)
	{
		if (coll.relativeVelocity.magnitude > breakForce)
		{
			playEffect();
		}
	}
}
